//run.cpp
#include <iostream>
using namespace std;

template <typename T>
T Max(T* a, int m , int n);

int main() {
    int arr1[] = {1, 2, 484, -324, 4848, 7, 484, 7, 59489, -49};
    double arr2[] = {485.84, 489.345, -354165.487, 489894.87, 1984.752, 189.75};
    cout << Max(arr1, 0, 9) << endl;
    cout << Max(arr2, 1, 4) << endl;
    return 0;
}

template <typename T>
T Max(T* a, int m , int n) {
    T max = *(a + m);
    for (int i = m + 1 ; i < n; i++) {
        if (*(a + i) > max) {
            max = a[i];
        }
    }
    return max;
}